Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Clean up ESLint warnings in packages/notifications #1194

Merged

Conversation

syamsudotdev
Copy link
Contributor

@syamsudotdev syamsudotdev commented Nov 21, 2023

Monika Pull Request (PR)

What feature/issue does this PR add

  1. Clean up ESLint warnings in packages/notifications directory
  2. Clean up ESLint warnings caused by catch clause type any

How did you implement / how did you fix it

  1. Apply recommendations based on ESLint
  2. Fix build error caused by type changes
  3. Change catch (error: any) clause to catch(error: unknown)
  4. Change handling catch to safely get error message from unknown type

How to test

  1. Run npm test
  2. Run npm pack && npm i -g hyperjumptech-monika-*.tgz
  3. Run monika

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (e42bb39) 63.60% compared to head (4a16b14) 63.71%.

Files Patch % Lines
src/jobs/summary-notification.ts 28.57% 5 Missing ⚠️
packages/notification/channel/instatus/index.ts 20.00% 4 Missing ⚠️
packages/notification/utils/catch-error-handler.ts 50.00% 3 Missing and 1 partial ⚠️
...ugins/visualization/atlassian-status-page/index.ts 20.00% 4 Missing ⚠️
src/utils/catch-error-handler.ts 50.00% 3 Missing and 1 partial ⚠️
src/components/config/parse-har.ts 0.00% 3 Missing ⚠️
src/components/config/parse-postman.ts 25.00% 1 Missing and 2 partials ⚠️
src/components/config/parse.ts 40.00% 1 Missing and 2 partials ⚠️
src/utils/read-file.ts 66.66% 2 Missing and 1 partial ⚠️
src/components/config/index.ts 60.00% 2 Missing ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1194      +/-   ##
==========================================
+ Coverage   63.60%   63.71%   +0.11%     
==========================================
  Files         108      111       +3     
  Lines        3171     3211      +40     
  Branches      534      544      +10     
==========================================
+ Hits         2017     2046      +29     
- Misses        981      988       +7     
- Partials      173      177       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sapiderman sapiderman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍷 🍺 🍻

@raosan
Copy link
Contributor

raosan commented Nov 30, 2023

since making PR related to packages/notification , just reminder to:

  1. increament version in packages/notification/package.json
  2. match the version in root ./package.json > @hyperjumptech/monika-notification

as described here: https://github.com/hyperjumptech/monika/tree/main/packages/notification#releasing

Conflicts:
	src/components/config/index.ts
	src/components/probe/prober/mariadb/request.ts
	src/symon/index.test.ts
@syamsudotdev syamsudotdev force-pushed the chore/cleanup-eslint-warns branch from 839087c to 4a16b14 Compare December 1, 2023 15:40
@syamsudotdev
Copy link
Contributor Author

since making PR related to packages/notification , just reminder to:

  1. increament version in packages/notification/package.json
  2. match the version in root ./package.json > @hyperjumptech/monika-notification

as described here: https://github.com/hyperjumptech/monika/tree/main/packages/notification#releasing

Bumped on #1202

@syamsudotdev syamsudotdev merged commit 0002a7f into hyperjumptech:main Dec 4, 2023
@syamsudotdev syamsudotdev deleted the chore/cleanup-eslint-warns branch December 4, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants